import tornado.httpserver
import tornado.ioloop
import tornado.options

import application  # 导入自定义的应用程序模块
import config  # 导入自定义配合的py文件

"""
    server服务配置
"""
if __name__ == "__main__":
    app = application.MainApplication()
    httpServer = tornado.httpserver.HTTPServer(app)
    httpServer.bind(config.options["port"])
    httpServer.start(1)
    print("server success start, port:", config.options["port"])
    tornado.ioloop.IOLoop.current().start()
